home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / AppletStub.java < prev    next >
Text File  |  1998-09-22  |  3KB  |  93 lines

  1. /*
  2.  * @(#)AppletStub.java    1.13 98/07/01
  3.  *
  4.  * Copyright 1995-1998 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  * 
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14. package java.applet;
  15.  
  16. import java.net.URL;
  17.  
  18. /**
  19.  * When an applet is first created, an applet stub is attached to it 
  20.  * using the applet's <code>setStub</code> method. This stub 
  21.  * serves as the interface between the applet and the browser 
  22.  * environment or applet viewer environment in which the application 
  23.  * is running. 
  24.  *
  25.  * @author     Arthur van Hoff
  26.  * @version     1.13, 07/01/98
  27.  * @see         java.applet.Applet#setStub(java.applet.AppletStub)
  28.  * @since       JDK1.0
  29.  */
  30. public interface AppletStub {
  31.     /**
  32.      * Determines if the applet is active. An applet is active just 
  33.      * before its <code>start</code> method is called. It becomes 
  34.      * inactive immediately after its <code>stop</code> method is called. 
  35.      *
  36.      * @return  <code>true</code> if the applet is active;
  37.      *          <code>false</code> otherwise.
  38.      * @since   JDK1.0
  39.      */
  40.     boolean isActive();
  41.     
  42.     /**
  43.      * Gets the document URL.
  44.      *
  45.      * @return  the <code>URL</code> of the document containing the applet.
  46.      * @since   JDK1.0
  47.      */
  48.     URL getDocumentBase();
  49.  
  50.     /**
  51.      * Gets the base URL.
  52.      *
  53.      * @return  the <code>URL</code> of the applet.
  54.      * @since   JDK1.0
  55.      */
  56.     URL getCodeBase();
  57.  
  58.     /**
  59.      * Returns the value of the named parameter in the HTML tag. For 
  60.      * example, if an applet is specified as 
  61.      * <ul><code>
  62.      *    <applet code="Clock" width=50 height=50><br>
  63.      *  <param name=Color value="blue"><br>
  64.      *  </applet>
  65.      * </code></ul>
  66.      * <p>
  67.      * then a call to <code>getParameter("Color")</code> returns the 
  68.      * value <code>"blue"</code>. 
  69.      *
  70.      * @param   name   a parameter name.
  71.      * @return  the value of the named parameter.
  72.      * @since   JDK1.0
  73.      */
  74.     String getParameter(String name);
  75.  
  76.     /**
  77.      * Gets a handler to the applet's context.
  78.      *
  79.      * @return  the applet's context.
  80.      * @since   JDK1.0
  81.      */
  82.     AppletContext getAppletContext();
  83.  
  84.     /**
  85.      * Called when the applet wants to be resized. 
  86.      *
  87.      * @param   width    the new requested width for the applet.
  88.      * @param   height   the new requested height for the applet.
  89.      * @since   JDK1.0
  90.      */
  91.     void appletResize(int width, int height);
  92. }
  93.